package com.cxf.windex.enums;

/**
 * 资金操作 类型enum
 */
public enum OperateEnum {
  /**---------佣金钱包开始-----------**/
  INCOME_SPREAD("a_income_spread","推广佣金"),
  INCOME_COMMISSION("a_income_commission","提成佣金"),
  INCOME_BONUS("a_income_bonus","奖励佣金"),
  INCOME_BACK("a_income_back","佣金退回"),
  INCOME_ORDERS("s_income_orders","订单支付"),
  INCOME_CASH_F("a_income_cash_fail", "佣金钱包提现失败"),
  INCOME_CASH("s_income_cash_froze", "佣金钱包提现申请"),
  INCOME_CASH_S("s_income_cash_success", "佣金钱包提现成功"),
  INCOME_CASH_FEE("s_income_cash_fee", "佣金钱包提现手续费"),
  /**---------佣金钱包结束-----------**/

  /**---------余额钱包开始-----------**/
  COST_RECHARGE("a_cost_recharge","充值"),
  COST_BONUS("a_cost_bonus","奖励余额"),
  COST_ACTIVITY("a_cost_activity","活动奖励"),
  COST_BACK("a_cost_back","订单余额退回"),
  COST_ORDERS("s_cost_orders","订单支付"),
  /**---------余额钱包结束-----------**/

  /**---------微信消耗开始-----------**/
  WX_RECHARGE("s_wx_recharge","充值"),
  WX_CERT("s_wx_cert","认证用户"),
  WX_ORDERS("s_wx_orders","订单支付"),
  /**---------微信消耗开始-----------**/
  ;

  private final String key;
  private final String desc;


  private OperateEnum(String key, String desc) {
    this.key = key;
    this.desc = desc;
  }

  public static OperateEnum getIdType(String idType) {
    OperateEnum[] its = values();
    OperateEnum[] arr$ = its;
    int len$ = its.length;

    for(int i$ = 0; i$ < len$; ++i$) {
      OperateEnum it = arr$[i$];
      if (it.getKey() .equals( idType)) {
        return it;
      }
    }
    return null;
  }

  public String getKey() {
    return this.key;
  }

  public String getDesc() {
    return this.desc;
  }
}
